/*
参数说明
rightContent2-标头搜索按钮
rightContent-管理、添加
leftContent-返回、选择省份
*/
<template>
  <div>
    <x-header style="background-color:#3d82e5;width:100%;position:absolute;left:0;top:0;z-index:100;" :left-options="{showBack: needBack}">
      <slot name="content"></slot>
      <a slot="left" href="javascript:;" style="color: #ffffff" @click="leftCallback" v-if="needLeft">
        <slot name="leftContent"></slot>
      </a>
      <div slot="right"  @click="rightCallback" style="color: #ffffff" v-if="needRight">
        <slot name="rightContent"></slot>
      </div>
      <div slot="right"  @click="rightCallback" style="color: #ffffff" v-if="needRight2">
        <slot name="rightContent2"></slot>
      </div>
    </x-header>
  </div>
</template>

<script>
  import { XHeader } from 'vux'
  export default {
    components: {
      XHeader
    },
    props: {
      rightCallback: {
        type: Function,
        default: function () {
        }
      },
      leftCallback: {
        type: Function,
        default: function () {
        }
      },
      needRight: {
        type: Boolean,
        default: false
      },
      needRight2: {
        type: Boolean,
        default: false
      },
      needLeft: {
        type: Boolean,
        default: false
      },
      needBack: {
        type: Boolean,
        default: false
      }
    },
    data () {
      return {
      }
    }
  }
</script>
